package com.zhuss.core.orign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.orign.DetailOrignBo;
import com.zhuss.bean.bo.core.orign.SearchOrignBo;
import com.zhuss.common.ReadService;
import com.zhuss.core.processor.OrignRead;
import com.zhuss.exception.AabException;


/**
 * orign查询service（基本查询）
 * @author zhushanshuo
 * @Date 2020-02-20 11:58
 *
 */
@Component("orignReadService")
public class OrignReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("orignRead")
	private OrignRead orignRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws AabException {
		DetailOrignBo bo = (DetailOrignBo) param;
		Long orignId = bo.getOrignId();
		Object vo = orignRead.detail(orignId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchOrignBo bo = (SearchOrignBo) param;
		Object result = orignRead.list(bo);
		return result;
	}
	
	
}

